// 设置token
export const setToken = (token, name = 'userInfo', type = 1) => {
  type === 1 ? localStorage.setItem(name, token) : sessionStorage.setItem(name, token)
}
// 获取token
export const getToken = (name, type = 1) => {
  return type === 1 ? localStorage.getItem(name) : sessionStorage.setItem(name)
}
// 清除token
export const removeToken = (token = '', name = 'userInfo', type = 1) => {
  setToken(token, name, type)
}
